﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace sy1_9
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {

        }
        private void Initial()
        {
            picBalloon.Location = new Point(0, this.ClientSize.Height - 120);
            picBalloon.Size = new Size(120, 120);
        }

       
        private void timer1_Tick(object sender, EventArgs e)
        {
            picBalloon.Left += 2;
            picBalloon.Top -= 2;
            picBalloon.Width -= 1;
            picBalloon.Height -= 1;

            if (picBalloon.Top < -picBalloon.Height * 2)
            {
                timer1.Stop();
                Initial();
            }
        }

        private void btnStart_Click(object sender, EventArgs e)
        {
            timer1.Start();
        }
    }
}
